package org.strieber.fca;

import java.io.File;

public class HashemiRT {
	static String inputFileNameSOD = "resultsSOD.txt";
	static String inputFileNameCRT = "resultsCRT.txt";
	static String inputFileNameGPX = "resultsGPX.txt";
	static String inputFileNameCAT = "resultsCAT.txt";
	static String inputFileNameMDA = "resultsMDA.txt";

	static String saveFileNameSOD = "hashemiSOD.txt";
	static String saveFileNameCRT = "hashemiCRT.txt";
	static String saveFileNameGPX = "hashemiGPX.txt";
	static String saveFileNameCAT = "hashemiCAT.txt";
	static String saveFileNameMDA = "hashemiMDA.txt";
	
	public static void main(String[] args) throws Exception {

		File inputFileSOD = new File(inputFileNameSOD);
		File inputFileCRT = new File(inputFileNameCRT);
		File inputFileGPX = new File(inputFileNameGPX);
		File inputFileCAT = new File(inputFileNameCAT);
		File inputFileMDA = new File(inputFileNameMDA);

		File saveFileSOD = new File(saveFileNameSOD);
		File saveFileCRT = new File(saveFileNameCRT);
		File saveFileGPX = new File(saveFileNameGPX);
		File saveFileCAT = new File(saveFileNameCAT);
		File saveFileMDA = new File(saveFileNameMDA);

		ResultsTrimmer rtSOD = new ResultsTrimmer(inputFileSOD);
		ResultsTrimmer rtCRT = new ResultsTrimmer(inputFileCRT);
		ResultsTrimmer rtGPX = new ResultsTrimmer(inputFileGPX);
		ResultsTrimmer rtCAT = new ResultsTrimmer(inputFileCAT);
		ResultsTrimmer rtMDA = new ResultsTrimmer(inputFileMDA);
	
		rtSOD.pruneByMinSupport(10);
		rtSOD.pruneByMinConfidence(75);
		rtSOD.pruneByExactNumberOfIntents(1);
		rtSOD.pruneByRequiredIntent("SOD");
		rtSOD.exportRules(saveFileSOD);
		
		rtCRT.pruneByMinSupport(10);
		rtCRT.pruneByMinConfidence(75);
		rtCRT.pruneByExactNumberOfIntents(1);
		rtCRT.pruneByRequiredIntent("CRT");
		rtCRT.exportRules(saveFileCRT);
	
		rtGPX.pruneByMinSupport(10);
		rtGPX.pruneByMinConfidence(75);
		rtGPX.pruneByExactNumberOfIntents(1);
		rtGPX.pruneByRequiredIntent("GPX");
		rtGPX.exportRules(saveFileGPX);
		
		rtCAT.pruneByMinSupport(10);
		rtCAT.pruneByMinConfidence(75);
		rtCAT.pruneByExactNumberOfIntents(1);
		rtCAT.pruneByRequiredIntent("CAT");
		rtCAT.exportRules(saveFileCAT);
	
		rtMDA.pruneByMinSupport(10);
		rtMDA.pruneByMinConfidence(75);
		rtMDA.pruneByExactNumberOfIntents(1);
		rtMDA.pruneByRequiredIntent("MDA");
		rtMDA.exportRules(saveFileMDA);
	}
}
